﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Log_DevAlarm数据模型对象
    /// </summary>
    [Serializable]
    public partial class Log_DevAlarmMod
    {
        /// <summary>
        /// 初始化Log_DevAlarm数据模型对象
        /// </summary>
        public Log_DevAlarmMod()
        {
            
        }
        /// <summary>
        /// 初始化Log_DevAlarm数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="cTime">CTime</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="cType">CType</param>
        /// <param name="cValue">CValue</param>
        /// <param name="isQuery">IsQuery</param>
        public Log_DevAlarmMod(long iD,DateTime cTime,string deviceNo,string cType,string cValue,bool isQuery)
        {
            //给ID字段赋值
            this.ID = iD;
            //给CTime字段赋值
            this.CTime = cTime;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给CType字段赋值
            this.CType = cType;
            //给CValue字段赋值
            this.CValue = cValue;
            //给IsQuery字段赋值
            this.IsQuery = isQuery;
        }
        /// <summary>
        /// 初始化Log_DevAlarm数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="cTime">CTime</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="cType">CType</param>
        /// <param name="cValue">CValue</param>
        /// <param name="isQuery">IsQuery</param>
        /// <param name="longi">Longi</param>
        /// <param name="lati">Lati</param>
        /// <param name="xWhere">xWhere</param>
        public Log_DevAlarmMod(long iD,DateTime cTime,string deviceNo,string cType,string cValue,bool isQuery,decimal? longi,decimal? lati,string xWhere)
        {
            //给ID字段赋值
            this.ID = iD;
            //给CTime字段赋值
            this.CTime = cTime;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给CType字段赋值
            this.CType = cType;
            //给CValue字段赋值
            this.CValue = cValue;
            //给IsQuery字段赋值
            this.IsQuery = isQuery;
            //给Longi字段赋值
            this.Longi = longi;
            //给Lati字段赋值
            this.Lati = lati;
            //给xWhere字段赋值
            this.XWhere = xWhere;
        }
        
		//属性存储数据的变量
        private long _iD;
        private DateTime _cTime;
        private string _deviceNo;
        private string _cType;
        private string _cValue;
        private bool _isQuery;
        private decimal? _longi;
        private decimal? _lati;
        private string _xWhere;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// CType
        /// </summary>
        public string CType
        {
            get { return this._cType; }
            set { this._cType = value; }
        }
        /// <summary>
        /// CValue
        /// </summary>
        public string CValue
        {
            get { return this._cValue; }
            set { this._cValue = value; }
        }
        /// <summary>
        /// IsQuery
        /// </summary>
        public bool IsQuery
        {
            get { return this._isQuery; }
            set { this._isQuery = value; }
        }
        /// <summary>
        /// Longi
        /// </summary>
        public decimal? Longi
        {
            get { return this._longi; }
            set { this._longi = value; }
        }
        /// <summary>
        /// Lati
        /// </summary>
        public decimal? Lati
        {
            get { return this._lati; }
            set { this._lati = value; }
        }
        /// <summary>
        /// xWhere
        /// </summary>
        public string XWhere
        {
            get { return this._xWhere; }
            set { this._xWhere = value; }
        }
        
        /// <summary>
        /// 对比两个Log_DevAlarm数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Log_DevAlarm数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Log_DevAlarm数据模型对象
            Log_DevAlarmMod log_DevAlarmMod = obj as Log_DevAlarmMod;
            //判断是否转换成功
            if (log_DevAlarmMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == log_DevAlarmMod.ID &&
                //判断CTime是否一致
                this.CTime == log_DevAlarmMod.CTime &&
                //判断DeviceNo是否一致
                this.DeviceNo == log_DevAlarmMod.DeviceNo &&
                //判断CType是否一致
                this.CType == log_DevAlarmMod.CType &&
                //判断CValue是否一致
                this.CValue == log_DevAlarmMod.CValue &&
                //判断IsQuery是否一致
                this.IsQuery == log_DevAlarmMod.IsQuery &&
                //判断Longi是否一致
                this.Longi == log_DevAlarmMod.Longi &&
                //判断Lati是否一致
                this.Lati == log_DevAlarmMod.Lati &&
                //判断xWhere是否一致
                this.XWhere == log_DevAlarmMod.XWhere;
        }
        /// <summary>
        /// 将当前Log_DevAlarm数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Log_DevAlarm数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将CType进行按位异或运算处理
                (this.CType == null ? 2147483647 : this.CType.GetHashCode()) ^
                //将CValue进行按位异或运算处理
                (this.CValue == null ? 2147483647 : this.CValue.GetHashCode()) ^
                //将IsQuery进行按位异或运算处理
                this.IsQuery.GetHashCode() ^
                //将Longi进行按位异或运算处理
                (this.Longi == null ? 2147483647 : this.Longi.GetHashCode()) ^
                //将Lati进行按位异或运算处理
                (this.Lati == null ? 2147483647 : this.Lati.GetHashCode()) ^
                //将xWhere进行按位异或运算处理
                (this.XWhere == null ? 2147483647 : this.XWhere.GetHashCode());
        }
        /// <summary>
        /// 将当前Log_DevAlarm数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Log_DevAlarm数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将CTime转换成字符串
                this.CTime + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将CType转换成字符串
                this.CType + "," +
                //将CValue转换成字符串
                this.CValue + "," +
                //将IsQuery转换成字符串
                this.IsQuery +
                "]";
        }
    }
}
